通过用户标识查询用户状态
商户使用用户标识通过该接口查询用户的协议状态。
🚫
本接口服务已于 2019.12.16
(北京时间)下线,文档仅做留存参考。
请求参数 | 类型 | 描述 |
---|---|---|
openid | string | 用户标识 |
query | object | 声明请求的查询参数 |
sub_mchid | string | 特约商户号 |
trade_scene | string | 交易场景 |
php
$instance->v3->ebike->charge->users->_openid_->contract->getAsync([
'openid' => 'onqOjjmM1tad-3ROpncN-yUfa6ua',
'query' => [
'sub_mchid' => '1900000109',
'trade_scene' => 'CHARGE',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/ebike/charge/users/{openid}/contract')->getAsync([
'openid' => 'onqOjjmM1tad-3ROpncN-yUfa6ua',
'query' => [
'sub_mchid' => '1900000109',
'trade_scene' => 'CHARGE',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/ebike/charge/users/{openid}/contract']->getAsync([
'openid' => 'onqOjjmM1tad-3ROpncN-yUfa6ua',
'query' => [
'sub_mchid' => '1900000109',
'trade_scene' => 'CHARGE',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->ebike->charge->users->_openid_->contract->get([
'openid' => 'onqOjjmM1tad-3ROpncN-yUfa6ua',
'query' => [
'sub_mchid' => '1900000109',
'trade_scene' => 'CHARGE',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/ebike/charge/users/{openid}/contract')->get([
'openid' => 'onqOjjmM1tad-3ROpncN-yUfa6ua',
'query' => [
'sub_mchid' => '1900000109',
'trade_scene' => 'CHARGE',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/ebike/charge/users/{openid}/contract']->get([
'openid' => 'onqOjjmM1tad-3ROpncN-yUfa6ua',
'query' => [
'sub_mchid' => '1900000109',
'trade_scene' => 'CHARGE',
],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典 | 类型 | 描述 |
---|---|---|
mchid | string | 服务商商户号 |
openid | string | 用户标识 |
sub_mchid | string | 特约商户号 |
contract_id | string | 充电授权扣费协议号 |
contract_state | string | 协议状态 |
参阅 官方文档